﻿using System;
using System.Collections.Generic;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata;

namespace CarEdge.Infrastructure.EFCore.MySql
{
    public partial class caredgeContext : DbContext
    {
        public caredgeContext()
        {
        }

        public caredgeContext(DbContextOptions<caredgeContext> options)
            : base(options)
        {
        }

        public virtual DbSet<Consume> Consumes { get; set; } = null!;
        public virtual DbSet<Customer> Customers { get; set; } = null!;
        public virtual DbSet<CustomerRecord> CustomerRecords { get; set; } = null!;
        public virtual DbSet<Order> Orders { get; set; } = null!;
        public virtual DbSet<OrderDetail> OrderDetails { get; set; } = null!;
        public virtual DbSet<OrderPay> OrderPays { get; set; } = null!;
        public virtual DbSet<ProductPackage> ProductPackages { get; set; } = null!;
        public virtual DbSet<ProductPackageDetail> ProductPackageDetails { get; set; } = null!;
        public virtual DbSet<SysActionLog> SysActionLogs { get; set; } = null!;
        public virtual DbSet<SysDepartment> SysDepartments { get; set; } = null!;
        public virtual DbSet<SysDepartmentDuty> SysDepartmentDuties { get; set; } = null!;
        public virtual DbSet<SysDictionary> SysDictionaries { get; set; } = null!;
        public virtual DbSet<SysDictionaryType> SysDictionaryTypes { get; set; } = null!;
        public virtual DbSet<SysDuty> SysDuties { get; set; } = null!;
        public virtual DbSet<SysErrorLog> SysErrorLogs { get; set; } = null!;
        public virtual DbSet<SysLoginLog> SysLoginLogs { get; set; } = null!;
        public virtual DbSet<SysProduct> SysProducts { get; set; } = null!;
        public virtual DbSet<SysProductType> SysProductTypes { get; set; } = null!;
        public virtual DbSet<SysReservation> SysReservations { get; set; } = null!;
        public virtual DbSet<SysReservationDetail> SysReservationDetails { get; set; } = null!;
        public virtual DbSet<SysRight> SysRights { get; set; } = null!;
        public virtual DbSet<SysRightConfig> SysRightConfigs { get; set; } = null!;
        public virtual DbSet<SysRightConfigDetail> SysRightConfigDetails { get; set; } = null!;
        public virtual DbSet<SysRightConfigOrg> SysRightConfigOrgs { get; set; } = null!;
        public virtual DbSet<SysUploadFile> SysUploadFiles { get; set; } = null!;
        public virtual DbSet<SysUser> SysUsers { get; set; } = null!;
        public virtual DbSet<SysUserInfo> SysUserInfos { get; set; } = null!;
        public virtual DbSet<SysUserPoint> SysUserPoints { get; set; } = null!;
        public virtual DbSet<SysUserPointhistory> SysUserPointhistories { get; set; } = null!;
        public virtual DbSet<SysUserRight> SysUserRights { get; set; } = null!;
        public virtual DbSet<SysVerify> SysVerifies { get; set; } = null!;
        public virtual DbSet<Vip> Vips { get; set; } = null!;

        protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
        {
            if (!optionsBuilder.IsConfigured)
            {
#warning To protect potentially sensitive information in your connection string, you should move it out of source code. You can avoid scaffolding the connection string by using the Name= syntax to read it from configuration - see https://go.microsoft.com/fwlink/?linkid=2131148. For more guidance on storing connection strings, see http://go.microsoft.com/fwlink/?LinkId=723263.
                optionsBuilder.UseMySql("server=localhost;user id=root;password=123456;database=caredge", Microsoft.EntityFrameworkCore.ServerVersion.Parse("8.0.40-mysql"));
            }
        }

        protected override void OnModelCreating(ModelBuilder modelBuilder)
        {
            modelBuilder.UseCollation("utf8mb4_0900_ai_ci")
                .HasCharSet("utf8mb4");

            modelBuilder.Entity<Consume>(entity =>
            {
                entity.HasKey(e => e.CId)
                    .HasName("PRIMARY");

                entity.ToTable("consume");

                entity.Property(e => e.CId)
                    .HasMaxLength(32)
                    .HasColumnName("C_ID")
                    .HasComment("消费ID");

                entity.Property(e => e.CBalance)
                    .HasColumnName("C_Balance")
                    .HasComment("余额");

                entity.Property(e => e.CCreateTime)
                    .HasColumnType("datetime")
                    .HasColumnName("C_CreateTime")
                    .HasComment("创建时间");

                entity.Property(e => e.CMoney)
                    .HasColumnName("C_Money")
                    .HasComment("金额");

                entity.Property(e => e.CPid)
                    .HasMaxLength(32)
                    .HasColumnName("C_PID")
                    .HasComment("商品ID");

                entity.Property(e => e.CType)
                    .HasColumnName("C_Type")
                    .HasComment("充值/支出");

                entity.Property(e => e.CVid)
                    .HasMaxLength(32)
                    .HasColumnName("C_VID")
                    .HasComment("客户/会员ID");
            });

            modelBuilder.Entity<Customer>(entity =>
            {
                entity.HasKey(e => e.CId)
                    .HasName("PRIMARY");

                entity.ToTable("customer");

                entity.HasComment("客户表")
                    .UseCollation("utf8mb4_general_ci");

                entity.Property(e => e.CId)
                    .HasMaxLength(32)
                    .HasColumnName("C_ID")
                    .HasComment("客户ID");

                entity.Property(e => e.CAddress)
                    .HasMaxLength(500)
                    .HasColumnName("C_Address")
                    .HasComment("地址");

                entity.Property(e => e.CAuthor)
                    .HasMaxLength(50)
                    .HasColumnName("C_Author")
                    .HasComment("创建人");

                entity.Property(e => e.CCreateTime)
                    .HasColumnType("datetime")
                    .HasColumnName("C_Create_Time")
                    .HasComment("添加时间");

                entity.Property(e => e.CDesc)
                    .HasMaxLength(255)
                    .HasColumnName("C_Desc")
                    .HasComment("备用");

                entity.Property(e => e.CDid)
                    .HasMaxLength(32)
                    .HasColumnName("C_DID")
                    .HasComment("会员ID\r\n会员id");

                entity.Property(e => e.CFollowTime)
                    .HasColumnType("datetime")
                    .HasColumnName("C_Follow_Time")
                    .HasComment("跟踪时间");

                entity.Property(e => e.CLevel)
                    .HasColumnName("C_Level")
                    .HasComment("级别");

                entity.Property(e => e.CMileage)
                    .HasColumnName("C_Mileage")
                    .HasComment("里程");

                entity.Property(e => e.CName)
                    .HasMaxLength(32)
                    .HasColumnName("C_Name")
                    .HasComment("客户名字");

                entity.Property(e => e.CNextTime)
                    .HasColumnType("datetime")
                    .HasColumnName("C_Next_Time")
                    .HasComment("下次联系时间");

                entity.Property(e => e.CPhone)
                    .HasMaxLength(20)
                    .HasColumnName("C_Phone")
                    .HasComment("电话");

                entity.Property(e => e.CQq)
                    .HasMaxLength(20)
                    .HasColumnName("C_QQ")
                    .HasComment("QQ");

                entity.Property(e => e.CRechargeAmount)
                    .HasColumnName("C_Recharge_Amount")
                    .HasComment("充值金额");

                entity.Property(e => e.CRecord)
                    .HasMaxLength(50)
                    .HasColumnName("C_Record")
                    .HasComment("备案人");

                entity.Property(e => e.CRecordCount)
                    .HasColumnName("C_record_count")
                    .HasComment("跟进次数");

                entity.Property(e => e.CRemark)
                    .HasMaxLength(500)
                    .HasColumnName("C_Remark")
                    .HasComment("备注");

                entity.Property(e => e.CResponsibility)
                    .HasMaxLength(50)
                    .HasColumnName("C_Responsibility")
                    .HasComment("负责人");

                entity.Property(e => e.CSchool)
                    .HasMaxLength(100)
                    .HasColumnName("C_School")
                    .HasComment("学校");

                entity.Property(e => e.CSeasTime)
                    .HasColumnType("datetime")
                    .HasColumnName("C_Seas_Time")
                    .HasComment("进入公海时间");

                entity.Property(e => e.CSource)
                    .HasMaxLength(50)
                    .HasColumnName("C_Source")
                    .HasComment("来源");

                entity.Property(e => e.CStatus)
                    .HasColumnName("C_Status")
                    .HasComment("状态");

                entity.Property(e => e.CSuccessPercent)
                    .HasColumnName("C_success_percent")
                    .HasComment("成功率");

                entity.Property(e => e.CType)
                    .HasMaxLength(255)
                    .HasColumnName("C_type")
                    .HasComment("客户类别");

                entity.Property(e => e.CUpdateTime)
                    .HasColumnType("datetime")
                    .HasColumnName("C_Update_Time")
                    .HasComment("最后更新时间");

                entity.Property(e => e.CVehicleModel)
                    .HasMaxLength(255)
                    .HasColumnName("C_Vehicle_Model")
                    .HasComment("车型");

                entity.Property(e => e.CWechat)
                    .HasMaxLength(100)
                    .HasColumnName("C_Wechat")
                    .HasComment("微信");
            });

            modelBuilder.Entity<CustomerRecord>(entity =>
            {
                entity.HasKey(e => e.CrId)
                    .HasName("PRIMARY");

                entity.ToTable("customer_record");

                entity.HasComment("客户跟进表");

                entity.Property(e => e.CrId)
                    .HasMaxLength(32)
                    .HasColumnName("CR_ID")
                    .HasComment("跟进ID");

                entity.Property(e => e.CrAuthor)
                    .HasMaxLength(255)
                    .HasColumnName("CR_Author")
                    .HasComment("跟进人");

                entity.Property(e => e.CrCId)
                    .HasMaxLength(32)
                    .HasColumnName("CR_C_ID")
                    .HasComment("客户ID");

                entity.Property(e => e.CrContent)
                    .HasMaxLength(32)
                    .HasColumnName("CR_Content")
                    .HasComment("跟进内容");

                entity.Property(e => e.CrCreateTime)
                    .HasColumnType("datetime")
                    .HasColumnName("CR_CreateTime")
                    .HasComment("创建时间");

                entity.Property(e => e.CrDate)
                    .HasColumnType("datetime")
                    .HasColumnName("CR_Date")
                    .HasComment("跟进日期");

                entity.Property(e => e.CrDesc)
                    .HasMaxLength(255)
                    .HasColumnName("CR_Desc");

                entity.Property(e => e.CrIsConvert)
                    .HasColumnName("CR_IsConvert")
                    .HasComment("是否转换");

                entity.Property(e => e.CrLocation)
                    .HasMaxLength(255)
                    .HasColumnName("CR_location")
                    .HasComment("地址");

                entity.Property(e => e.CrNextTime)
                    .HasColumnType("datetime")
                    .HasColumnName("CR_Next_Time")
                    .HasComment("下一次联系时间");

                entity.Property(e => e.CrNo)
                    .HasColumnName("CR_No")
                    .HasComment("该客户跟进次数");

                entity.Property(e => e.CrResult)
                    .HasColumnName("CR_Result")
                    .HasComment("跟进结果");

                entity.Property(e => e.CrSuccess)
                    .HasColumnName("CR_Success")
                    .HasComment("预估成功概率");
            });

            modelBuilder.Entity<Order>(entity =>
            {
                entity.HasKey(e => e.OId)
                    .HasName("PRIMARY");

                entity.ToTable("orders");

                entity.UseCollation("utf8mb4_general_ci");

                entity.Property(e => e.OId)
                    .HasMaxLength(32)
                    .HasColumnName("O_ID")
                    .HasComment("订单编号");

                entity.Property(e => e.OCId)
                    .HasMaxLength(32)
                    .HasColumnName("O_C_ID")
                    .HasComment("客户ID");

                entity.Property(e => e.OCount)
                    .HasColumnName("O_Count")
                    .HasComment("商品总数量");

                entity.Property(e => e.OCreateTime)
                    .HasColumnType("datetime")
                    .HasColumnName("O_CreateTime")
                    .HasComment("开单时间");

                entity.Property(e => e.ODesc)
                    .HasMaxLength(255)
                    .HasColumnName("O_Desc");

                entity.Property(e => e.OIsFinish)
                    .HasColumnName("O_IsFinish")
                    .HasComment("是否完成");

                entity.Property(e => e.OIsPay)
                    .HasColumnName("O_IsPay")
                    .HasComment("是否支付");

                entity.Property(e => e.OMoney)
                    .HasColumnName("O_Money")
                    .HasComment("金额");

                entity.Property(e => e.OPayModel)
                    .HasColumnName("O_Pay_Model")
                    .HasComment("支付模式");

                entity.Property(e => e.OPayMoney)
                    .HasColumnName("O_Pay_Money")
                    .HasComment("支付金额");

                entity.Property(e => e.OPayTime)
                    .HasColumnType("datetime")
                    .HasColumnName("O_Pay_Time")
                    .HasComment("支付时间");

                entity.Property(e => e.OPeople)
                    .HasColumnName("O_People")
                    .HasComment("人数");

                entity.Property(e => e.ORoom)
                    .HasMaxLength(32)
                    .HasColumnName("O_Room")
                    .HasComment("房间");
            });

            modelBuilder.Entity<OrderDetail>(entity =>
            {
                entity.HasKey(e => e.OdId)
                    .HasName("PRIMARY");

                entity.ToTable("order_details");

                entity.UseCollation("utf8mb4_general_ci");

                entity.Property(e => e.OdId)
                    .HasMaxLength(32)
                    .HasColumnName("OD_ID");

                entity.Property(e => e.OdCount).HasColumnName("OD_Count");

                entity.Property(e => e.OdCreateTime)
                    .HasColumnType("datetime")
                    .HasColumnName("OD_CreateTime");

                entity.Property(e => e.OdIsPay).HasColumnName("OD_IsPay");

                entity.Property(e => e.OdMoney).HasColumnName("OD_Money");

                entity.Property(e => e.OdOId)
                    .HasMaxLength(32)
                    .HasColumnName("OD_O_ID");

                entity.Property(e => e.OdPId)
                    .HasMaxLength(32)
                    .HasColumnName("OD_P_ID");

                entity.Property(e => e.OdPName)
                    .HasMaxLength(255)
                    .HasColumnName("OD_P_Name")
                    .HasComment("商品名字");

                entity.Property(e => e.OdPPhoto)
                    .HasMaxLength(255)
                    .HasColumnName("OD_P_Photo")
                    .HasComment("图片地址");

                entity.Property(e => e.OdSum).HasColumnName("OD_Sum");
            });

            modelBuilder.Entity<OrderPay>(entity =>
            {
                entity.HasKey(e => e.PId)
                    .HasName("PRIMARY");

                entity.ToTable("order_pay");

                entity.UseCollation("utf8mb4_general_ci");

                entity.Property(e => e.PId)
                    .HasMaxLength(32)
                    .HasColumnName("P_ID");

                entity.Property(e => e.PCreateTime)
                    .HasColumnType("datetime")
                    .HasColumnName("P_CreateTime");

                entity.Property(e => e.PFinishTime)
                    .HasColumnType("datetime")
                    .HasColumnName("P_FinishTime");

                entity.Property(e => e.PIsFinish).HasColumnName("P_IsFinish");

                entity.Property(e => e.PMoney).HasColumnName("P_Money");

                entity.Property(e => e.POId)
                    .HasMaxLength(32)
                    .HasColumnName("P_O_ID");
            });

            modelBuilder.Entity<ProductPackage>(entity =>
            {
                entity.HasKey(e => e.PpId)
                    .HasName("PRIMARY");

                entity.ToTable("product_package");

                entity.Property(e => e.PpId)
                    .HasMaxLength(32)
                    .HasColumnName("PP_ID")
                    .HasComment("套餐ID");

                entity.Property(e => e.PpBeginTime)
                    .HasColumnType("datetime")
                    .HasColumnName("PP_BeginTime")
                    .HasComment("开始时间");

                entity.Property(e => e.PpCreateTime)
                    .HasColumnType("datetime")
                    .HasColumnName("PP_CreateTime")
                    .HasComment("创建时间");

                entity.Property(e => e.PpDesc)
                    .HasMaxLength(255)
                    .HasColumnName("PP_Desc");

                entity.Property(e => e.PpDiscount)
                    .HasColumnName("PP_Discount")
                    .HasComment("折扣");

                entity.Property(e => e.PpDuration)
                    .HasColumnName("pp_Duration")
                    .HasComment("服务时长");

                entity.Property(e => e.PpEndTime)
                    .HasColumnType("datetime")
                    .HasColumnName("PP_EndTime")
                    .HasComment("结束时间");

                entity.Property(e => e.PpExplain)
                    .HasMaxLength(200)
                    .HasColumnName("PP_Explain")
                    .HasComment("描述");

                entity.Property(e => e.PpImg)
                    .HasMaxLength(999)
                    .HasColumnName("PP_Img")
                    .HasComment("套餐图片");

                entity.Property(e => e.PpIsActive)
                    .HasColumnName("PP_IsActive")
                    .HasComment("是否上架");

                entity.Property(e => e.PpName)
                    .HasMaxLength(100)
                    .HasColumnName("PP_Name")
                    .HasComment("套餐名称");

                entity.Property(e => e.PpSalescount)
                    .HasColumnName("pp_Salescount")
                    .HasComment("销量");

                entity.Property(e => e.PpStock)
                    .HasColumnName("PP_Stock")
                    .HasComment("套餐数量,0为不限量");

                entity.Property(e => e.PpTotalPrice)
                    .HasColumnName("PP_Total_Price")
                    .HasComment("总价");
            });

            modelBuilder.Entity<ProductPackageDetail>(entity =>
            {
                entity.HasKey(e => e.PpdId)
                    .HasName("PRIMARY");

                entity.ToTable("product_package_details");

                entity.Property(e => e.PpdId)
                    .HasMaxLength(32)
                    .HasColumnName("PPD_ID")
                    .HasComment("详情ID");

                entity.Property(e => e.PpdPId)
                    .HasMaxLength(32)
                    .HasColumnName("PPD_P_ID")
                    .HasComment("产品ID");

                entity.Property(e => e.PpdPpId)
                    .HasMaxLength(32)
                    .HasColumnName("PPD_PP_ID")
                    .HasComment("套餐ID");

                entity.Property(e => e.PpdPrice)
                    .HasColumnName("PPD_Price")
                    .HasComment("单价");

                entity.Property(e => e.PpdQuantity)
                    .HasColumnName("PPD_Quantity")
                    .HasComment("数量");

                entity.Property(e => e.PpdTotalPrice)
                    .HasColumnName("PPD_Total_Price")
                    .HasComment("总价");
            });

            modelBuilder.Entity<SysActionLog>(entity =>
            {
                entity.HasKey(e => e.Alid)
                    .HasName("PRIMARY");

                entity.ToTable("sys_action_logs");

                entity.HasComment("行为日志表")
                    .UseCollation("utf8mb4_unicode_ci");

                entity.Property(e => e.Alid)
                    .HasMaxLength(32)
                    .HasColumnName("ALID");

                entity.Property(e => e.Alaction)
                    .HasMaxLength(50)
                    .HasColumnName("ALAction")
                    .HasComment("行为");

                entity.Property(e => e.AlapiUrl)
                    .HasMaxLength(200)
                    .HasColumnName("ALApiUrl")
                    .HasComment("本次请求的接口地址");

                entity.Property(e => e.AlcreateTime)
                    .HasColumnType("datetime")
                    .HasColumnName("ALCreateTime")
                    .HasComment("操作时间");

                entity.Property(e => e.Aldesc)
                    .HasMaxLength(255)
                    .HasColumnName("ALDesc")
                    .HasComment("备用");

                entity.Property(e => e.Alip)
                    .HasMaxLength(20)
                    .HasColumnName("ALIp")
                    .HasComment("本次请求的IP");

                entity.Property(e => e.Alparams)
                    .HasMaxLength(999)
                    .HasColumnName("ALParams")
                    .HasComment("本次请求的参数");

                entity.Property(e => e.Alresult)
                    .HasColumnName("ALResult")
                    .HasComment("操作结果");

                entity.Property(e => e.AlresultMessage)
                    .HasMaxLength(999)
                    .HasColumnName("ALResultMessage")
                    .HasComment("结果信息");

                entity.Property(e => e.Altype)
                    .HasMaxLength(50)
                    .HasColumnName("ALType")
                    .HasComment("类型");

                entity.Property(e => e.Aluid)
                    .HasMaxLength(32)
                    .HasColumnName("ALUID")
                    .HasComment("用户ID");

                entity.Property(e => e.Alversion)
                    .HasMaxLength(10)
                    .HasColumnName("ALVersion")
                    .HasComment("记录版本：管理端/客户端");
            });

            modelBuilder.Entity<SysDepartment>(entity =>
            {
                entity.HasKey(e => e.Did)
                    .HasName("PRIMARY");

                entity.ToTable("sys_department");

                entity.UseCollation("utf8mb4_unicode_ci");

                entity.Property(e => e.Did)
                    .HasMaxLength(32)
                    .HasColumnName("DID")
                    .HasComment("部门ID")
                    .UseCollation("utf8mb4_0900_ai_ci");

                entity.Property(e => e.DcreateTime)
                    .HasColumnType("datetime")
                    .HasColumnName("DCreateTime")
                    .HasComment("添加时间");

                entity.Property(e => e.Ddesc)
                    .HasMaxLength(255)
                    .HasColumnName("DDesc")
                    .HasComment("备用");

                entity.Property(e => e.Dexplain)
                    .HasMaxLength(255)
                    .HasColumnName("DExplain")
                    .HasComment("描述");

                entity.Property(e => e.Dicon)
                    .HasMaxLength(50)
                    .HasColumnName("DIcon")
                    .HasComment("图标代码");

                entity.Property(e => e.DisBan)
                    .HasColumnName("DIsBan")
                    .HasComment("是否禁用");

                entity.Property(e => e.Dlv)
                    .HasColumnName("DLv")
                    .HasComment("部门等级");

                entity.Property(e => e.Dname)
                    .HasMaxLength(50)
                    .HasColumnName("DName")
                    .HasComment("部门名称");

                entity.Property(e => e.Dno)
                    .HasColumnName("DNo")
                    .HasComment("序号");

                entity.Property(e => e.Dparent)
                    .HasMaxLength(32)
                    .HasColumnName("DParent")
                    .HasComment("上级组织ID");
            });

            modelBuilder.Entity<SysDepartmentDuty>(entity =>
            {
                entity.HasKey(e => e.Ddid)
                    .HasName("PRIMARY");

                entity.ToTable("sys_department_duties");

                entity.UseCollation("utf8mb4_unicode_ci");

                entity.Property(e => e.Ddid)
                    .HasMaxLength(32)
                    .HasColumnName("DDID")
                    .HasComment("ID")
                    .UseCollation("utf8mb4_0900_ai_ci");

                entity.Property(e => e.DdcreateTime)
                    .HasColumnType("datetime")
                    .HasColumnName("DDCreateTime")
                    .HasComment("时间");

                entity.Property(e => e.DddeptId)
                    .HasMaxLength(32)
                    .HasColumnName("DDDeptID")
                    .HasComment("部门ID");

                entity.Property(e => e.DddutyId)
                    .HasMaxLength(32)
                    .HasColumnName("DDDutyID")
                    .HasComment("组织ID");
            });

            modelBuilder.Entity<SysDictionary>(entity =>
            {
                entity.HasKey(e => e.DId)
                    .HasName("PRIMARY");

                entity.ToTable("sys_dictionary");

                entity.UseCollation("utf8mb4_general_ci");

                entity.Property(e => e.DId)
                    .HasMaxLength(32)
                    .HasColumnName("D_ID")
                    .HasComment("字典ID");

                entity.Property(e => e.DAuthor)
                    .HasMaxLength(32)
                    .HasColumnName("D_Author")
                    .HasComment("添加人");

                entity.Property(e => e.DCreateTime)
                    .HasColumnType("datetime")
                    .HasColumnName("D_CreateTime")
                    .HasComment("添加时间");

                entity.Property(e => e.DDesc)
                    .HasMaxLength(255)
                    .HasColumnName("D_Desc");

                entity.Property(e => e.DDtId)
                    .HasMaxLength(32)
                    .HasColumnName("D_DT_ID")
                    .HasComment("类型ID");

                entity.Property(e => e.DExplain)
                    .HasMaxLength(255)
                    .HasColumnName("D_Explain")
                    .HasComment("描述");

                entity.Property(e => e.DName)
                    .HasMaxLength(99)
                    .HasColumnName("D_Name")
                    .HasComment("名称");

                entity.Property(e => e.DUpdateAuthor)
                    .HasMaxLength(32)
                    .HasColumnName("D_Update_Author")
                    .HasComment("最后修改人");

                entity.Property(e => e.DUserCount)
                    .HasColumnName("D_UserCount")
                    .HasComment("使用次数");

                entity.Property(e => e.DValue)
                    .HasMaxLength(32)
                    .HasColumnName("D_Value")
                    .HasComment("值");
            });

            modelBuilder.Entity<SysDictionaryType>(entity =>
            {
                entity.HasKey(e => e.DtId)
                    .HasName("PRIMARY");

                entity.ToTable("sys_dictionary_type");

                entity.HasComment("字典类型表")
                    .UseCollation("utf8mb4_general_ci");

                entity.Property(e => e.DtId)
                    .HasMaxLength(32)
                    .HasColumnName("DT_ID")
                    .HasComment("字典类型ID");

                entity.Property(e => e.DtAuthor)
                    .HasMaxLength(32)
                    .HasColumnName("DT_Author")
                    .HasComment("添加人");

                entity.Property(e => e.DtCount)
                    .HasColumnName("DT_Count")
                    .HasComment("子级数量");

                entity.Property(e => e.DtCreateTime)
                    .HasColumnType("datetime")
                    .HasColumnName("DT_CreateTime")
                    .HasComment("添加时间");

                entity.Property(e => e.DtDesc)
                    .HasMaxLength(255)
                    .HasColumnName("DT_Desc");

                entity.Property(e => e.DtExplain)
                    .HasMaxLength(255)
                    .HasColumnName("DT_Explain")
                    .HasComment("描述");

                entity.Property(e => e.DtKey)
                    .HasMaxLength(50)
                    .HasColumnName("DT_Key")
                    .HasComment("类型关键字");

                entity.Property(e => e.DtName)
                    .HasMaxLength(50)
                    .HasColumnName("DT_Name")
                    .HasComment("类型名称");

                entity.Property(e => e.DtUpdateAuthor)
                    .HasMaxLength(32)
                    .HasColumnName("DT_Update_Author")
                    .HasComment("最后修改人");

                entity.Property(e => e.DtValue)
                    .HasMaxLength(99)
                    .HasColumnName("DT_Value")
                    .HasComment("类型值");
            });

            modelBuilder.Entity<SysDuty>(entity =>
            {
                entity.HasKey(e => e.Did)
                    .HasName("PRIMARY");

                entity.ToTable("sys_duties");

                entity.UseCollation("utf8mb4_unicode_ci");

                entity.Property(e => e.Did)
                    .HasMaxLength(32)
                    .HasColumnName("DID")
                    .HasComment("职务ID");

                entity.Property(e => e.DcreateTime)
                    .HasColumnType("datetime")
                    .HasColumnName("DCreateTime")
                    .HasComment("添加时间");

                entity.Property(e => e.Ddesc)
                    .HasMaxLength(255)
                    .HasColumnName("DDesc")
                    .HasComment("备用");

                entity.Property(e => e.Dexplain)
                    .HasMaxLength(255)
                    .HasColumnName("DExplain")
                    .HasComment("描述");

                entity.Property(e => e.DisBan)
                    .HasColumnName("DIsBan")
                    .HasComment("是否禁用");

                entity.Property(e => e.Dlv)
                    .HasColumnName("DLv")
                    .HasComment("职务等级");

                entity.Property(e => e.Dname)
                    .HasMaxLength(50)
                    .HasColumnName("DName")
                    .HasComment("职务名称");
            });

            modelBuilder.Entity<SysErrorLog>(entity =>
            {
                entity.HasKey(e => e.Elid)
                    .HasName("PRIMARY");

                entity.ToTable("sys_error_logs");

                entity.HasComment("错误日志表")
                    .UseCollation("utf8mb4_unicode_ci");

                entity.Property(e => e.Elid)
                    .HasMaxLength(32)
                    .HasColumnName("ELID");

                entity.Property(e => e.Elapi)
                    .HasMaxLength(200)
                    .HasColumnName("ELApi")
                    .HasComment("引发错误的接口地址");

                entity.Property(e => e.ElcreateTime)
                    .HasColumnType("datetime")
                    .HasColumnName("ELCreateTime")
                    .HasComment("操作时间");

                entity.Property(e => e.Eldesc)
                    .HasMaxLength(255)
                    .HasColumnName("ELDesc")
                    .HasComment("备用");

                entity.Property(e => e.Elip)
                    .HasMaxLength(20)
                    .HasColumnName("ELIp")
                    .HasComment("请求IP");

                entity.Property(e => e.Elmessage)
                    .HasMaxLength(999)
                    .HasColumnName("ELMessage")
                    .HasComment("错误消息");

                entity.Property(e => e.Elparams)
                    .HasMaxLength(999)
                    .HasColumnName("ELParams")
                    .HasComment("本次请求的参数");

                entity.Property(e => e.Eluid)
                    .HasMaxLength(32)
                    .HasColumnName("ELUID")
                    .HasComment("用户ID");
            });

            modelBuilder.Entity<SysLoginLog>(entity =>
            {
                entity.HasKey(e => e.Llid)
                    .HasName("PRIMARY");

                entity.ToTable("sys_login_logs");

                entity.HasComment("登录日志")
                    .HasCharSet("utf8mb3")
                    .UseCollation("utf8mb3_unicode_ci");

                entity.Property(e => e.Llid)
                    .HasMaxLength(32)
                    .HasColumnName("LLID")
                    .HasComment("ID");

                entity.Property(e => e.Llcode)
                    .HasMaxLength(32)
                    .HasColumnName("LLCode")
                    .HasComment("生成的凭据");

                entity.Property(e => e.LlcreateTime)
                    .HasColumnType("datetime")
                    .HasColumnName("LLCreateTime")
                    .HasComment("登录时间");

                entity.Property(e => e.Llexplain)
                    .HasMaxLength(200)
                    .HasColumnName("LLExplain")
                    .HasComment("描述");

                entity.Property(e => e.Llip)
                    .HasMaxLength(99)
                    .HasColumnName("LLIP")
                    .HasComment("登录IP");

                entity.Property(e => e.Llresult)
                    .HasColumnName("LLResult")
                    .HasComment("登录结果");

                entity.Property(e => e.Lltype)
                    .HasMaxLength(50)
                    .HasColumnName("LLType")
                    .HasComment("登录类型");

                entity.Property(e => e.Lluid)
                    .HasMaxLength(32)
                    .HasColumnName("LLUID")
                    .HasComment("用户ID");
            });

            modelBuilder.Entity<SysProduct>(entity =>
            {
                entity.HasKey(e => e.Pid)
                    .HasName("PRIMARY");

                entity.ToTable("sys_product");

                entity.Property(e => e.Pid)
                    .HasMaxLength(32)
                    .HasColumnName("PID")
                    .HasComment("产品ID");

                entity.Property(e => e.PDuration)
                    .HasColumnName("P_Duration")
                    .HasComment("服务时长 仅限于服务类产品");

                entity.Property(e => e.Pcount)
                    .HasColumnName("PCount")
                    .HasComment("产品库存");

                entity.Property(e => e.Pcreatetime)
                    .HasColumnType("datetime")
                    .HasComment("产品上架时间");

                entity.Property(e => e.Pdata)
                    .HasColumnType("datetime")
                    .HasColumnName("PData")
                    .HasComment("产品生产日期");

                entity.Property(e => e.Pdesc)
                    .HasMaxLength(255)
                    .HasColumnName("PDesc")
                    .HasComment("备用");

                entity.Property(e => e.Pexplain)
                    .HasMaxLength(255)
                    .HasComment("产品描述");

                entity.Property(e => e.Pimage)
                    .HasMaxLength(9999)
                    .HasComment("产品图片");

                entity.Property(e => e.PisTop)
                    .HasColumnName("PIsTop")
                    .HasComment("是否置顶");

                entity.Property(e => e.Pislist).HasComment("产品是否上架");

                entity.Property(e => e.Pname)
                    .HasMaxLength(255)
                    .HasColumnName("PName")
                    .HasComment("产品名称");

                entity.Property(e => e.Pno)
                    .HasColumnName("PNo")
                    .HasComment("序号");

                entity.Property(e => e.Pprice).HasComment("产品价格");

                entity.Property(e => e.Psales).HasComment("产品销量");

                entity.Property(e => e.Pshelf).HasComment("产品保质期");

                entity.Property(e => e.Ptid)
                    .HasMaxLength(32)
                    .HasColumnName("PTID")
                    .HasComment("产品类别ID");

                entity.Property(e => e.Ptype).HasComment("产品类型");
            });

            modelBuilder.Entity<SysProductType>(entity =>
            {
                entity.HasKey(e => e.Ptid)
                    .HasName("PRIMARY");

                entity.ToTable("sys_product_type");

                entity.Property(e => e.Ptid)
                    .HasMaxLength(32)
                    .HasColumnName("PTID")
                    .HasComment("产品类型ID");

                entity.Property(e => e.PtDesc)
                    .HasMaxLength(255)
                    .HasColumnName("PT_Desc")
                    .HasComment("备用");

                entity.Property(e => e.PtIsTime)
                    .HasColumnName("PT_isTime")
                    .HasComment("是否需要时长");

                entity.Property(e => e.PtParentId)
                    .HasMaxLength(32)
                    .HasColumnName("PT_Parent_ID")
                    .HasComment("父类别ID");

                entity.Property(e => e.PtcreateTime)
                    .HasColumnType("datetime")
                    .HasColumnName("PTCreateTime")
                    .HasComment("产品类型创建时间");

                entity.Property(e => e.Ptexplain)
                    .HasMaxLength(255)
                    .HasColumnName("PTexplain")
                    .HasComment("类别描述\r\n");

                entity.Property(e => e.Ptname)
                    .HasMaxLength(255)
                    .HasColumnName("PTName")
                    .HasComment("产品类型名称");
            });

            modelBuilder.Entity<SysReservation>(entity =>
            {
                entity.HasKey(e => e.Rid)
                    .HasName("PRIMARY");

                entity.ToTable("sys_reservation");

                entity.Property(e => e.Rid)
                    .HasMaxLength(32)
                    .HasColumnName("RID")
                    .HasComment("预约ID");

                entity.Property(e => e.Rcid)
                    .HasMaxLength(32)
                    .HasColumnName("RCID")
                    .HasComment("预约客户");

                entity.Property(e => e.RendTime)
                    .HasColumnType("datetime")
                    .HasColumnName("REndTime")
                    .HasComment("结束时间");

                entity.Property(e => e.Risactive).HasComment("是否付款");

                entity.Property(e => e.Rprice)
                    .HasColumnName("RPrice")
                    .HasComment("预约总价");

                entity.Property(e => e.Rstate)
                    .HasColumnName("RState")
                    .HasComment("预约状态");

                entity.Property(e => e.Rtime)
                    .HasColumnType("datetime")
                    .HasColumnName("RTime")
                    .HasComment("开始时间");

                entity.Property(e => e.Ruid)
                    .HasMaxLength(32)
                    .HasColumnName("RUID")
                    .HasComment("预约技师");
            });

            modelBuilder.Entity<SysReservationDetail>(entity =>
            {
                entity.HasKey(e => e.Rdid)
                    .HasName("PRIMARY");

                entity.ToTable("sys_reservation_details");

                entity.Property(e => e.Rdid)
                    .HasMaxLength(32)
                    .HasColumnName("RDID")
                    .HasComment("预约ID");

                entity.Property(e => e.RdcreateTime)
                    .HasColumnType("datetime")
                    .HasColumnName("RDCreateTime")
                    .HasComment("创建时间");

                entity.Property(e => e.Rdpid)
                    .HasMaxLength(32)
                    .HasColumnName("RDPID")
                    .HasComment("预约的项目");

                entity.Property(e => e.Rdprice)
                    .HasColumnName("RDPrice")
                    .HasComment("预约待付款");

                entity.Property(e => e.Rid)
                    .HasMaxLength(32)
                    .HasColumnName("RID")
                    .HasComment("连接预约表的字段");
            });

            modelBuilder.Entity<SysRight>(entity =>
            {
                entity.HasKey(e => e.Rid)
                    .HasName("PRIMARY");

                entity.ToTable("sys_rights");

                entity.HasComment("权限表")
                    .UseCollation("utf8mb4_unicode_ci");

                entity.Property(e => e.Rid)
                    .HasMaxLength(32)
                    .HasColumnName("RID")
                    .HasComment("ID");

                entity.Property(e => e.RcreateTime)
                    .HasColumnType("datetime")
                    .HasColumnName("RCreateTime")
                    .HasComment("添加时间");

                entity.Property(e => e.Rdesc)
                    .HasMaxLength(255)
                    .HasColumnName("RDesc")
                    .HasComment("备用");

                entity.Property(e => e.Rexplain)
                    .HasMaxLength(99)
                    .HasColumnName("RExplain")
                    .HasComment("描述");

                entity.Property(e => e.Ricon)
                    .HasMaxLength(99)
                    .HasColumnName("RIcon")
                    .HasComment("图标");

                entity.Property(e => e.RisBan)
                    .HasColumnName("RIsBan")
                    .HasComment("是否已禁用");

                entity.Property(e => e.RisDel)
                    .HasColumnName("RIsDel")
                    .HasComment("是否删除");

                entity.Property(e => e.RisMenu)
                    .HasColumnName("RIsMenu")
                    .HasComment("是否会出现在菜单");

                entity.Property(e => e.RisPublic)
                    .HasColumnName("RIsPublic")
                    .HasComment("是否公开权限");

                entity.Property(e => e.RisPublish)
                    .HasColumnName("RIsPublish")
                    .HasComment("是否发布");

                entity.Property(e => e.Rname)
                    .HasMaxLength(20)
                    .HasColumnName("RName")
                    .HasComment("名chen/菜单名");

                entity.Property(e => e.Rno)
                    .HasColumnName("RNo")
                    .HasComment("序号");

                entity.Property(e => e.RparentRid)
                    .HasMaxLength(32)
                    .HasColumnName("RParentRID")
                    .HasComment("上级权限ID");

                entity.Property(e => e.Rstate)
                    .HasColumnName("RState")
                    .HasComment("状态");

                entity.Property(e => e.Rurl)
                    .HasMaxLength(50)
                    .HasColumnName("RUrl")
                    .HasComment("地址");
            });

            modelBuilder.Entity<SysRightConfig>(entity =>
            {
                entity.HasKey(e => e.Rcid)
                    .HasName("PRIMARY");

                entity.ToTable("sys_right_config");

                entity.HasComment("权限-配置表")
                    .UseCollation("utf8mb4_unicode_ci");

                entity.Property(e => e.Rcid)
                    .HasMaxLength(32)
                    .HasColumnName("RCID")
                    .HasComment("ID");

                entity.Property(e => e.Rccount)
                    .HasColumnName("RCCount")
                    .HasComment("包含权限数量");

                entity.Property(e => e.RccreateTime)
                    .HasColumnType("datetime")
                    .HasColumnName("RCCreateTime")
                    .HasComment("创建时间");

                entity.Property(e => e.Rcdesc)
                    .HasMaxLength(255)
                    .HasColumnName("RCDesc")
                    .HasComment("备用");

                entity.Property(e => e.RcisBan)
                    .HasColumnName("RCIsBan")
                    .HasComment("是否禁用");

                entity.Property(e => e.RcisPublish)
                    .HasColumnName("RCIsPublish")
                    .HasComment("是否发布");

                entity.Property(e => e.Rcname)
                    .HasMaxLength(20)
                    .HasColumnName("RCName")
                    .HasComment("配置名");

                entity.Property(e => e.Rcstate)
                    .HasColumnName("RCState")
                    .HasComment("状态");
            });

            modelBuilder.Entity<SysRightConfigDetail>(entity =>
            {
                entity.HasKey(e => e.Rcdid)
                    .HasName("PRIMARY");

                entity.ToTable("sys_right_config_details");

                entity.HasComment("权限配置关联表")
                    .UseCollation("utf8mb4_general_ci");

                entity.Property(e => e.Rcdid)
                    .HasMaxLength(32)
                    .HasColumnName("RCDID")
                    .HasComment("配置详情ID");

                entity.Property(e => e.RcdcreateTime)
                    .HasColumnType("datetime")
                    .HasColumnName("RCDCreateTime")
                    .HasComment("时间");

                entity.Property(e => e.Rcdrcid)
                    .HasMaxLength(999)
                    .HasColumnName("RCDRCID")
                    .HasComment("配置ID");

                entity.Property(e => e.Rcdrid)
                    .HasMaxLength(32)
                    .HasColumnName("RCDRID")
                    .HasComment("权限ID");
            });

            modelBuilder.Entity<SysRightConfigOrg>(entity =>
            {
                entity.HasKey(e => e.Rcoid)
                    .HasName("PRIMARY");

                entity.ToTable("sys_right_config_org");

                entity.Property(e => e.Rcoid)
                    .HasMaxLength(32)
                    .HasColumnName("RCOID");

                entity.Property(e => e.RcocreateTime)
                    .HasColumnType("datetime")
                    .HasColumnName("RCOCreateTime");

                entity.Property(e => e.RcodeptId)
                    .HasMaxLength(32)
                    .HasColumnName("RCODeptID");

                entity.Property(e => e.RcodutyId)
                    .HasMaxLength(32)
                    .HasColumnName("RCODutyID");

                entity.Property(e => e.RcoisAllDuties).HasColumnName("RCOIsAllDuties");

                entity.Property(e => e.RcoisPublish).HasColumnName("RCOIsPublish");

                entity.Property(e => e.Rcorcid)
                    .HasMaxLength(32)
                    .HasColumnName("RCORCID");
            });

            modelBuilder.Entity<SysUploadFile>(entity =>
            {
                entity.HasKey(e => e.Ufid)
                    .HasName("PRIMARY");

                entity.ToTable("sys_upload_files");

                entity.UseCollation("utf8mb4_general_ci");

                entity.Property(e => e.Ufid)
                    .HasMaxLength(32)
                    .HasColumnName("UFID")
                    .HasComment("文件ID");

                entity.Property(e => e.UfcreateTime)
                    .HasColumnType("datetime")
                    .HasColumnName("UFCreateTime")
                    .HasComment("上传时间");

                entity.Property(e => e.Ufdesc)
                    .HasMaxLength(255)
                    .HasColumnName("UFDesc");

                entity.Property(e => e.UfisBan)
                    .HasColumnName("UFIsBan")
                    .HasComment("是否禁用");

                entity.Property(e => e.Ufname)
                    .HasMaxLength(32)
                    .HasColumnName("UFName")
                    .HasComment("文件名");

                entity.Property(e => e.Ufpath)
                    .HasMaxLength(999)
                    .HasColumnName("UFPath")
                    .HasComment("文件地址");

                entity.Property(e => e.Ufsize)
                    .HasColumnName("UFSize")
                    .HasComment("文件大小,单位B");

                entity.Property(e => e.Uftype)
                    .HasMaxLength(50)
                    .HasColumnName("UFType")
                    .HasComment("文件类型");

                entity.Property(e => e.UfuseCount)
                    .HasColumnName("UFUseCount")
                    .HasComment("使用次数");
            });

            modelBuilder.Entity<SysUser>(entity =>
            {
                entity.HasKey(e => e.Uid)
                    .HasName("PRIMARY");

                entity.ToTable("sys_users");

                entity.HasComment("用户表")
                    .HasCharSet("utf8mb3")
                    .UseCollation("utf8mb3_unicode_ci");

                entity.HasIndex(e => e.Uaccount, "UAccount")
                    .IsUnique();

                entity.Property(e => e.Uid)
                    .HasMaxLength(32)
                    .HasColumnName("UID")
                    .HasComment("用户ID")
                    .UseCollation("utf8mb4_0900_ai_ci")
                    .HasCharSet("utf8mb4");

                entity.Property(e => e.Uaccount)
                    .HasMaxLength(11)
                    .HasColumnName("UAccount")
                    .HasComment("账号/电话");

                entity.Property(e => e.UcreateTime)
                    .HasColumnType("datetime")
                    .HasColumnName("UCreateTime")
                    .HasComment("创建时间");

                entity.Property(e => e.Udept)
                    .HasMaxLength(32)
                    .HasColumnName("UDept")
                    .HasComment("部门ID");

                entity.Property(e => e.Udesc)
                    .HasMaxLength(255)
                    .HasColumnName("UDesc")
                    .HasComment("备用字段");

                entity.Property(e => e.Uduty)
                    .HasMaxLength(32)
                    .HasColumnName("UDuty")
                    .HasComment("职务/岗位ID");

                entity.Property(e => e.Ugender)
                    .HasMaxLength(10)
                    .HasColumnName("UGender")
                    .HasComment("性别");

                entity.Property(e => e.UisActive)
                    .HasColumnName("UIsActive")
                    .HasComment("是否激活");

                entity.Property(e => e.UisBan)
                    .HasColumnName("UIsBan")
                    .HasComment("是否禁用");

                entity.Property(e => e.Uname)
                    .HasMaxLength(10)
                    .HasColumnName("UName")
                    .HasComment("姓名");

                entity.Property(e => e.UopenId)
                    .HasMaxLength(50)
                    .HasColumnName("UOpenID")
                    .HasComment("小程序OPENID");

                entity.Property(e => e.Upassword)
                    .HasMaxLength(32)
                    .HasColumnName("UPassword")
                    .HasComment("密码");

                entity.Property(e => e.Usalt)
                    .HasMaxLength(32)
                    .HasComment("盐");
            });

            modelBuilder.Entity<SysUserInfo>(entity =>
            {
                entity.HasKey(e => e.Uid)
                    .HasName("PRIMARY");

                entity.ToTable("sys_user_info");

                entity.HasComment("用户信息表")
                    .UseCollation("utf8mb4_unicode_ci");

                entity.Property(e => e.Uid)
                    .HasMaxLength(32)
                    .HasColumnName("UID")
                    .HasComment("用户ID");

                entity.Property(e => e.Ubirthday)
                    .HasColumnType("datetime")
                    .HasColumnName("UBirthday")
                    .HasComment("生日");

                entity.Property(e => e.UcreateTime)
                    .HasColumnType("datetime")
                    .HasColumnName("UCreateTime")
                    .HasComment("添加时间");

                entity.Property(e => e.Udesc)
                    .HasMaxLength(255)
                    .HasColumnName("UDesc")
                    .HasComment("备用");

                entity.Property(e => e.Ugender)
                    .HasMaxLength(2)
                    .HasColumnName("UGender")
                    .IsFixedLength()
                    .HasComment("性别");

                entity.Property(e => e.UlastTime)
                    .HasColumnType("datetime")
                    .HasColumnName("ULastTime")
                    .HasComment("最后修改时间");

                entity.Property(e => e.Unick)
                    .HasMaxLength(20)
                    .HasColumnName("UNick")
                    .HasComment("昵称");

                entity.Property(e => e.Uphone)
                    .HasMaxLength(11)
                    .HasColumnName("UPhone")
                    .IsFixedLength()
                    .HasComment("电话");
            });

            modelBuilder.Entity<SysUserPoint>(entity =>
            {
                entity.HasKey(e => e.Upid)
                    .HasName("PRIMARY");

                entity.ToTable("sys_user_point");

                entity.HasComment("用户积分表")
                    .UseCollation("utf8mb4_general_ci");

                entity.Property(e => e.Upid)
                    .HasMaxLength(32)
                    .HasColumnName("UPID")
                    .HasComment("用户ID");

                entity.Property(e => e.Updesc)
                    .HasMaxLength(255)
                    .HasColumnName("UPDesc")
                    .HasComment("备用");

                entity.Property(e => e.UplastTime)
                    .HasColumnType("datetime")
                    .HasColumnName("UPLastTime")
                    .HasComment("最后获取或消耗积分的时间");

                entity.Property(e => e.Uppoint)
                    .HasColumnName("UPPoint")
                    .HasComment("累计积分");

                entity.Property(e => e.UpusePoint)
                    .HasColumnName("UPUsePoint")
                    .HasComment("消耗积分");
            });

            modelBuilder.Entity<SysUserPointhistory>(entity =>
            {
                entity.HasKey(e => e.Uphid)
                    .HasName("PRIMARY");

                entity.ToTable("sys_user_pointhistory");

                entity.HasComment("用户积分历史详情")
                    .UseCollation("utf8mb4_general_ci");

                entity.Property(e => e.Uphid)
                    .HasMaxLength(32)
                    .HasColumnName("UPHID")
                    .HasComment("用户积分历史详情ID");

                entity.Property(e => e.UphcreateTime)
                    .HasColumnType("datetime")
                    .HasColumnName("UPHCreateTime")
                    .HasComment("获取时间");

                entity.Property(e => e.Uphexplain)
                    .HasMaxLength(100)
                    .HasColumnName("UPHExplain")
                    .HasComment("描述");

                entity.Property(e => e.Uphpoint)
                    .HasColumnName("UPHPoint")
                    .HasComment("获取或消耗积分");

                entity.Property(e => e.UphrelationId)
                    .HasMaxLength(32)
                    .HasColumnName("UPHRelationID")
                    .HasComment("对应ID");

                entity.Property(e => e.Uphupid)
                    .HasMaxLength(32)
                    .HasColumnName("UPHUPID")
                    .HasComment("用户积分ID");

                entity.Property(e => e.Uptype)
                    .HasColumnName("UPType")
                    .HasComment("积分获取类型");
            });

            modelBuilder.Entity<SysUserRight>(entity =>
            {
                entity.HasKey(e => e.Urid)
                    .HasName("PRIMARY");

                entity.ToTable("sys_user_rights");

                entity.HasComment("用户-权限-关联表")
                    .UseCollation("utf8mb4_unicode_ci");

                entity.Property(e => e.Urid)
                    .HasMaxLength(32)
                    .HasColumnName("URID")
                    .HasComment("ID");

                entity.Property(e => e.UrbeginTime)
                    .HasColumnType("datetime")
                    .HasColumnName("URBeginTime")
                    .HasComment("权限生效时间");

                entity.Property(e => e.UrcreateTime)
                    .HasColumnType("datetime")
                    .HasColumnName("URCreateTime")
                    .HasComment("添加时间");

                entity.Property(e => e.Urdesc)
                    .HasMaxLength(255)
                    .HasColumnName("URDesc")
                    .HasComment("备用");

                entity.Property(e => e.UroutTime)
                    .HasColumnType("datetime")
                    .HasColumnName("UROutTime")
                    .HasComment("权限过期时间");

                entity.Property(e => e.Urrid)
                    .HasMaxLength(32)
                    .HasColumnName("URRID")
                    .HasComment("权限ID");

                entity.Property(e => e.Uruid)
                    .HasMaxLength(32)
                    .HasColumnName("URUID")
                    .HasComment("用户ID");
            });

            modelBuilder.Entity<SysVerify>(entity =>
            {
                entity.HasKey(e => e.Vid)
                    .HasName("PRIMARY");

                entity.ToTable("sys_verify");

                entity.HasComment("验证码")
                    .UseCollation("utf8mb4_unicode_ci");

                entity.Property(e => e.Vid)
                    .HasMaxLength(32)
                    .HasColumnName("VID")
                    .HasComment("ID");

                entity.Property(e => e.Vcode)
                    .HasMaxLength(8)
                    .HasColumnName("VCode")
                    .HasComment("发送的验证码");

                entity.Property(e => e.VcreateTime)
                    .HasColumnType("datetime")
                    .HasColumnName("VCreateTime")
                    .HasComment("创建时间");

                entity.Property(e => e.Vdesc)
                    .HasMaxLength(255)
                    .HasColumnName("VDesc")
                    .HasComment("备用");

                entity.Property(e => e.VisUse)
                    .HasColumnName("VIsUse")
                    .HasComment("是否使用");

                entity.Property(e => e.VoutTime)
                    .HasColumnType("datetime")
                    .HasColumnName("VOutTime")
                    .HasComment("过期时间");

                entity.Property(e => e.Vphone)
                    .HasMaxLength(11)
                    .HasColumnName("VPhone")
                    .HasComment("电话");

                entity.Property(e => e.VuseTime)
                    .HasColumnType("datetime")
                    .HasColumnName("VUseTime")
                    .HasComment("使用时间");
            });

            modelBuilder.Entity<Vip>(entity =>
            {
                entity.HasKey(e => e.VId)
                    .HasName("PRIMARY");

                entity.ToTable("vip");

                entity.Property(e => e.VId)
                    .HasMaxLength(32)
                    .HasColumnName("V_ID")
                    .HasComment("会员id");

                entity.Property(e => e.VActive)
                    .HasColumnName("V_Active")
                    .HasComment("0(不活跃),1(一般),2(活跃)");

                entity.Property(e => e.VActiveTime)
                    .HasColumnType("datetime")
                    .HasColumnName("V_ActiveTime")
                    .HasComment("激活时间");

                entity.Property(e => e.VCid)
                    .HasMaxLength(32)
                    .HasColumnName("V_CID")
                    .HasComment("客户id");

                entity.Property(e => e.VConsumption)
                    .HasColumnName("V_Consumption")
                    .HasComment("总消费");

                entity.Property(e => e.VCreateTime)
                    .HasColumnType("datetime")
                    .HasColumnName("V_CreateTime")
                    .HasComment("成为会员时间");

                entity.Property(e => e.VDid)
                    .HasMaxLength(32)
                    .HasColumnName("V_DID")
                    .HasComment("会员等级id");

                entity.Property(e => e.VEffectiveTime)
                    .HasColumnName("V_EffectiveTime")
                    .HasComment("会员有效时间(天)");

                entity.Property(e => e.VEndTime)
                    .HasColumnType("datetime")
                    .HasColumnName("V_EndTime")
                    .HasComment("会员过期时间");

                entity.Property(e => e.VIsExpire)
                    .HasColumnName("V_IsExpire")
                    .HasComment("是否过期");

                entity.Property(e => e.VRecharge)
                    .HasColumnName("V_Recharge")
                    .HasComment("总充值金额");
            });

            OnModelCreatingPartial(modelBuilder);
        }

        partial void OnModelCreatingPartial(ModelBuilder modelBuilder);
    }
}
